package beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class SucursalBean implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String nombre;
	private AreaBean cafeteria;
	private AreaBean barra;
	private AreaBean cocina;
	private SalonBean salon;
	private List<PersonalBean> personas = new ArrayList<PersonalBean>();
	private CartaBean carta;
	private DepositoBean deposito;
	private CajaBean caja;
	private List<AperturaMesaBean> aperturaMesa = new ArrayList<AperturaMesaBean>();
	
		
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getNombre() {
		return nombre;
	}
	public void setNombre(String nombre) {
		this.nombre = nombre;
	}
	
	
	public SalonBean getSalon() {
		return salon;
	}
	public void setSalon(SalonBean salon) {
		this.salon = salon;
	}
	public List<PersonalBean> getPersonas() {
		return personas;
	}
	public void setPersonas(List<PersonalBean> personas) {
		this.personas = personas;
	}
	public CartaBean getCarta() {
		return carta;
	}
	public void setCarta(CartaBean carta) {
		this.carta = carta;
	}
	public DepositoBean getDeposito() {
		return deposito;
	}
	public void setDeposito(DepositoBean deposito) {
		this.deposito = deposito;
	}
	public CajaBean getCaja() {
		return caja;
	}
	public void setCaja(CajaBean caja) {
		this.caja = caja;
	}
	public List<AperturaMesaBean> getAperturaMesa() {
		return aperturaMesa;
	}
	public void setAperturaMesa(List<AperturaMesaBean> aperturaMesa) {
		this.aperturaMesa = aperturaMesa;
	}
	public AreaBean getCafeteria() {
		return cafeteria;
	}
	public void setCafeteria(AreaBean cafeteria) {
		this.cafeteria = cafeteria;
	}
	public AreaBean getBarra() {
		return barra;
	}
	public void setBarra(AreaBean barra) {
		this.barra = barra;
	}
	public AreaBean getCocina() {
		return cocina;
	}
	public void setCocina(AreaBean cocina) {
		this.cocina = cocina;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((aperturaMesa == null) ? 0 : aperturaMesa.hashCode());
		result = prime * result + ((barra == null) ? 0 : barra.hashCode());
		result = prime * result
				+ ((cafeteria == null) ? 0 : cafeteria.hashCode());
		result = prime * result + ((caja == null) ? 0 : caja.hashCode());
		result = prime * result + ((carta == null) ? 0 : carta.hashCode());
		result = prime * result + ((cocina == null) ? 0 : cocina.hashCode());
		result = prime * result
				+ ((deposito == null) ? 0 : deposito.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((nombre == null) ? 0 : nombre.hashCode());
		result = prime * result
				+ ((personas == null) ? 0 : personas.hashCode());
		result = prime * result + ((salon == null) ? 0 : salon.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SucursalBean other = (SucursalBean) obj;
		if (aperturaMesa == null) {
			if (other.aperturaMesa != null)
				return false;
		} else if (!aperturaMesa.equals(other.aperturaMesa))
			return false;
		if (barra == null) {
			if (other.barra != null)
				return false;
		} else if (!barra.equals(other.barra))
			return false;
		if (cafeteria == null) {
			if (other.cafeteria != null)
				return false;
		} else if (!cafeteria.equals(other.cafeteria))
			return false;
		if (caja == null) {
			if (other.caja != null)
				return false;
		} else if (!caja.equals(other.caja))
			return false;
		if (carta == null) {
			if (other.carta != null)
				return false;
		} else if (!carta.equals(other.carta))
			return false;
		if (cocina == null) {
			if (other.cocina != null)
				return false;
		} else if (!cocina.equals(other.cocina))
			return false;
		if (deposito == null) {
			if (other.deposito != null)
				return false;
		} else if (!deposito.equals(other.deposito))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (nombre == null) {
			if (other.nombre != null)
				return false;
		} else if (!nombre.equals(other.nombre))
			return false;
		if (personas == null) {
			if (other.personas != null)
				return false;
		} else if (!personas.equals(other.personas))
			return false;
		if (salon == null) {
			if (other.salon != null)
				return false;
		} else if (!salon.equals(other.salon))
			return false;
		return true;
	}
	
	

}
